package com.liming.stock.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liming.common.enums.StockLockStatusEnum;
import com.liming.common.pojo.entity.stock.StockLock;
import com.liming.common.util.mybatisplus.MPUtil;
import com.liming.stock.mapper.StockLockMircoMapper;
import com.liming.stock.service.StockLockMircoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liming
 * @date 2025/1/21
 */
@Service
public class StockLockMircoServiceImpl extends ServiceImpl<StockLockMircoMapper, StockLock>
        implements StockLockMircoService, MPUtil<StockLock> {

    @Override
    public List<StockLock> stockLockListByOrderIdAndStatus(Long orderId, Integer status) {
        return lambdaQuery().eq(StockLock::getOrderId, orderId).eq(StockLock::getStatus, status).list();
    }
}
